<%@ page pageEncoding="UTF-8"%>
<%@ include file="taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta charset="UTF-8">
	<title>科技通后台管理系统</title>
   	<meta name="viewport" content="width=device-width,height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no">
   	<link rel="SHORTCUT ICON" href="${pageContext.request.contextPath}/static/images//logo.ico"/>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/index.css" id="css">
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
	<script type="text/javascript">
        function navList(id) {
		    var $obj = $("#juheweb"), $item = $("#J_nav_" + id);
		    $item.addClass("on").parent().removeClass("none").parent().addClass("selected");
		    $obj.find(".list").click(function () {
		        var $div = $(this).siblings(".list-item");
		        if ($(this).parent().hasClass("selected")) {
		            $div.slideUp(600);
		            $(this).parent().removeClass("selected");
		        }
		        if ($div.is(":hidden")) {
		            $("#juheweb li").find(".list-item").slideUp(600);
		            $("#juheweb li").removeClass("selected");
		            $(this).parent().addClass("selected");
		            $div.slideDown(600);
		        } else {
		            $div.slideUp(600);
		        }
		    });
		}     
        
   		function loadPage(e, src){
    		$("#iframe").attr("src", src);
    		$("p").removeClass("list_a");
    		$($(e).parent()).addClass("list_a").siblings().removeClass("list_a");    
		}
   
       	function hide(){
	       	var id1=document.getElementById("nav1");
	       	var id2=document.getElementById("nav2");
	       	var r=document.getElementById("right");
	       	id1.style.display="none";
	       	id2.style.display="block";
	       	r.style.width="97%";
	       		r.style.left="3%";
       	}

        function show(){
	       	var id1=document.getElementById("nav1");
	       	var id2=document.getElementById("nav2");
	       	var r=document.getElementById("right");
	       	id1.style.display="block";
	       	id2.style.display="none";
	       	r.style.width="84.2%";
	       	r.style.left="216px";
       	}
        
        function updatePassword() {
			window.location.href="${pageContext.request.contextPath}/login/passwordUpdateInit";
		}
        
        $(function(){
        	var clientHeight = $(window).height()-$('.header').height();
            $(".left").height(clientHeight );
//             $("#initlogin").click();
        });
        
        function bodyLoad(){
			var dateTime=new Date();
            var hh=dateTime.getHours();
            var mm=dateTime.getMinutes();
  		  	var ss=dateTime.getSeconds();
  		  	var yy=dateTime.getFullYear();
  		  	var MM=dateTime.getMonth()+1;  //因为1月这个方法返回为0，所以加1
  		  	var dd=dateTime.getDate();
  		  	var week=dateTime.getDay();
  			var days=["日 ", "一 ", "二 ", "三 ", "四 ", "五 ", "六 "] 

  		  	//document.getElementById("date").value=yy+"年"+MM+"月"+dd+"日 "+"星期"+days[week];
  			$("#date").html(yy+"年"+MM+"月"+dd+"日 "+"星期"+days[week]);
  		  	//document.getElementById("time").value=hh+"时"+mm+"分"+ss+"秒";
  		  	$("#time").html(hh+"时"+mm+"分"+ss+"秒");
  		  	setTimeout(bodyLoad,1000);
  	 	}
        
    </script>
    <style type="text/css">
    	a.red{ background-color : red;} 
    	a.green{background-color: green;}
    	.username{color: white; font-size: 15px;}
    </style>
</head>
<body onload="bodyLoad()">
	<div class="header" > 
		<div class="header_title"><img src="${ctx}/static/images/logo.png"/>科技通后台管理系统</div>
		<div class="login">
			 <span class="username" id="date"></span>
			 <span class="username" id="time"></span>
		     <span class="username">Welcome！<img src="${pageContext.request.contextPath}/static/images/head_white.png"></span>
		     <span class="username">${sessionScope.LOGININFO.loginName}</span>
		     <span class="username">　</span>
		     <button onfocus=blur() onclick="updatePassword()">修改密码</button>
		     <span class="username">|</span>
		     <button onclick="window.location.href='${ctx}/login/signout'">退出</button>
		</div>
	</div>
	<div class="content">
		<div class="left">
			<div class="nav1" style="display:black;" id="nav1">
                 <div class="operate">
                      <ul id="juheweb">
                      		<li><div class="nav_bg"><a ></a></div>
                           		<div class="list">
                              		<span class="xiangmu_icon icon"></span>
                              		<sapn class="nav_title">用户管理</span>
                             	</div>
                             	<div class="list-item none">
                                    <p><a onclick="loadPage(this, '${pageContext.request.contextPath}/tusersetting/managersetting')"> √ 管理员账号管理</a></p>
                                </div>
                           	</li>
                           	<li><div class="nav_bg"><a ></a></div>
                           		<div class="list">
                              		<span class="xiangmu_icon icon"></span>
                              		<sapn class="nav_title">开发者练习</span>
                             	</div>
                             	<%-- <div class="list-item none">
                                    <p><a onclick="loadPage(this, '${pageContext.request.contextPath}/tusersetting/managersetting')"> √ 管理员账号管理</a></p>
                                </div> --%>
                           	</li>
                       </ul>
                  </div>
                  <script type="text/javascript" language="javascript">navList(12);</script>
			      <div class="shensuo_big"> <img src="${pageContext.request.contextPath}/static/images/shensuo_big.png" onclick="hide();" >
			      </div>
			</div>
            
			<div class="nav2" style="display:none;" id="nav2">
            <br/>
               <div class="shensuo_small"><img src="${ctx}/static/images/shensuo_small.png" onclick="show();" ></div>
        </div>
		                            <!-- nav2 ç»æ-->
		</div>
		<div class="right" id="right">     
			<iframe id="iframe" src=""></iframe>
		</div>
	</div>
</body>
</html>